<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get textual country representation</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="gender-gender.construct.html">« Gender\Gender::__construct</a></li>
      <li style="float: right;"><a href="gender-gender.get.html">Gender\Gender::get »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.gender.html">Gender\Gender</a></li>
    <li>Get textual country representation</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="gender-gender.country" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Gender\Gender::country</h1>
  <p class="verinfo">(PECL gender &gt;= 0.8.0)</p><p class="refpurpose"><span class="refname">Gender\Gender::country</span> &mdash; <span class="dc-title">Get textual country representation</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-gender-gender.country-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Gender\Gender::country</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$country</code></span>): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Returns the textual representation of a country from a Gender class
   constant.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-gender-gender.country-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">country</code></dt>

    <dd>

     <p class="para">
      A country ID specified by a <span class="classname"><a href="class.gender.html" class="classname">Gender\Gender</a></span> class
      constant.
     </p>
    </dd>

    
   </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-gender-gender.country-returnvalues">
   <h3 class="title">返回值</h3>
   <p class="para">
    Returns an array with the short and full names of the country on success
     或者在失败时返回 <strong><code>false</code></strong>.
   </p>
 </div>


 <div class="refsect1 examples" id="refsect1-gender-gender.country-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2264">
    <p><strong>示例 #1 Using <span class="methodname"><strong>Gender\Gender::country()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
$gender&nbsp;=&nbsp;new&nbsp;Gender\Gender;<br />var_dump($gender-&gt;country(Gender\Gender::BRITAIN));</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
array(2) {
  &#039;country_short&#039; =&gt;
  string(2) &quot;UK&quot;
  &#039;country&#039; =&gt;
  string(13) &quot;Great Britain&quot;
}
</pre></div>
    </div>
   </div>
  </p>
 </div>

</div></div></div></body></html>